package com.lijie.userservice.controller;

import com.lijie.utilscommon.response.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author 哈喽;
 * @create 2020-07-22 21:43
 */
@Api(value = "用户登录信息管理")
@RestController
@RequestMapping("/userservice/user")
@CrossOrigin
public class LoginController {
    @ApiOperation(value = "用户登录")
    @PostMapping("/login")
    public Result login(){
        return Result.ok().data("token","123123");
    }

    @ApiOperation(value = "登录之后查询用户信息")
    @GetMapping("/info")
    public Result info(){
        return Result.ok().data("name","李杰").data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }

    @ApiOperation(value = "注销登录信息")
    @PostMapping("/logout")
    public Result logout(){
        return Result.ok();
    }

}
